package net.onceface.application.dto;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.UUID;

import javax.ws.rs.FormParam;
import javax.xml.bind.annotation.XmlRootElement;

import net.onceface.core.domain.OrderProduct;
import net.onceface.core.domain.enums.OrderStatus;
import net.onceface.core.domain.enums.Payment;
@XmlRootElement
public class OrderDTO implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -1500901816570612262L;

	@FormParam("id")
	private Long id;
	
	@FormParam("version")
	private int version;
	
	@FormParam("orderNumber")
	private String orderNumber;
	
	@FormParam("payment")
	private Payment payment;
	
	private String paymentName;
	
	private double totalPrice;
	
	private double discount;
	
	private double price;
	
	@FormParam("couponsId")
	private String couponsId;
	
	@FormParam("clientId")
	private Long clientId;
	
	private OrderStatus orderStatus;
	
	private String orderStatusName;
	
	@FormParam("expressNumber")
	private String expressNumber;
	
	@FormParam("expressName")
	private String expressName;
	
	@FormParam("remarks")
	private String remarks;
	
	@FormParam("address")
	private String address;
	
	@FormParam("receiver")
	private String receiver;
	
	@FormParam("phone")
	private String phone;
	
	@FormParam("disCountId")
	private Long disCountId;
	
	private Date createDate;
	
	private List<AddressDTO> addresses;
	
	private List<OrderProductDTO> orderProducts;
	
	private List<FeatureDTO> features;
	
	public OrderDTO(){}
	
	public OrderDTO(Long clientId, OrderStatus orderStatus){
		this.orderNumber = UUID.randomUUID().toString();
		this.clientId = clientId;
		this.orderStatus = orderStatus;
		this.createDate = new Date();
	}
	public OrderDTO(Long id, String orderNumber, double price, Long clientId, 
			OrderStatus orderStatus, Date createDate){
		this.id = id;
		this.orderNumber = orderNumber;
		this.price = price;
		this.clientId = clientId;
		this.orderStatus = orderStatus;
		this.createDate = createDate;
	}

	public List<OrderProductDTO> getOrderProducts() {
		return orderProducts;
	}

	public void setOrderProducts(List<OrderProductDTO> orderProducts) {
		this.orderProducts = orderProducts;
	}

	public List<FeatureDTO> getFeatures() {
		return features;
	}

	public void setFeatures(List<FeatureDTO> features) {
		this.features = features;
	}

	public Long getDisCountId() {
		return disCountId;
	}

	public void setDisCountId(Long disCountId) {
		this.disCountId = disCountId;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public int getVersion() {
		return version;
	}

	public void setVersion(int version) {
		this.version = version;
	}

	public String getOrderNumber() {
		return orderNumber;
	}

	public void setOrderNumber(String orderNumber) {
		this.orderNumber = orderNumber;
	}

	public Payment getPayment() {
		return payment;
	}

	public void setPayment(Payment payment) {
		this.payment = payment;
	}

	public String getPaymentName() {
		return paymentName;
	}

	public void setPaymentName(String paymentName) {
		this.paymentName = paymentName;
	}

	public double getTotalPrice() {
		return totalPrice;
	}

	public void setTotalPrice(double totalPrice) {
		this.totalPrice = totalPrice;
	}

	public double getDiscount() {
		return discount;
	}

	public void setDiscount(double discount) {
		this.discount = discount;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public String getCouponsId() {
		return couponsId;
	}

	public void setCouponsId(String couponsId) {
		this.couponsId = couponsId;
	}

	public Long getClientId() {
		return clientId;
	}

	public void setClientId(Long clientId) {
		this.clientId = clientId;
	}

	public OrderStatus getOrderStatus() {
		return orderStatus;
	}

	public void setOrderStatus(OrderStatus orderStatus) {
		this.orderStatus = orderStatus;
	}

	public String getOrderStatusName() {
		return orderStatusName;
	}

	public void setOrderStatusName(String orderStatusName) {
		this.orderStatusName = orderStatusName;
	}

	public String getExpressNumber() {
		return expressNumber;
	}

	public void setExpressNumber(String expressNumber) {
		this.expressNumber = expressNumber;
	}

	public String getExpressName() {
		return expressName;
	}

	public void setExpressName(String expressName) {
		this.expressName = expressName;
	}

	public String getRemarks() {
		return remarks;
	}

	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public List<AddressDTO> getAddresses() {
		return addresses;
	}

	public void setAddresses(List<AddressDTO> addresses) {
		this.addresses = addresses;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getReceiver() {
		return receiver;
	}

	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}
	
}
